export default {
    state: {
        user: null
    },
    mutations: {
        updateUser(state,user) {
            state.user = user;
        },
        updateUserOnes(state,data) {
            state.user[data.tips] = data.value || null;
        },
        upAmount(state) {
            state.user.amount = Number(state.user.amount)+1;
        },
        downAmount(state) {
            state.user.amount = Number(state.user.amount)-1;
        }
    }
}